#pragma GCC optimize(2)
#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
    int a, b, x;
    cin >> a >> b >> x;
    int l = 0, r = 1e9;
    while (l < r)
    {
        int mid = (l + r + 1) / 2;
        if (to_string(mid).size() * b + mid * a <= x) l = mid;
        else r = mid - 1;
    }
    cout << r << endl;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    // cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}